frappe.ui.form.on("BOM", {
    refresh(frm){
        if (!frm.is_new()){
            frm.add_custom_button(__('Multi Level BOM'), function() {            
                frappe.set_route("query-report", "Multi Level BOM", {'bom': frm.doc.name});
            });
        }
    }
})
